home *** CD-ROM | disk | FTP | other *** search
- if #argv < 3
- label usage
- echo >&2 "usage:\t$argv[0] {is|are} [your|my|it|there] thing(s)"
- echo >&2 "\t$argv[0] {am|are} [I|you]"
- return
- endif
- if argv[1] == "am"
- if lower(argv[2]) == "i"
- echo Wherever you go, there you are.
- return
- endif
- goto usage
- elseif argv[1] == 'are'
- if argv[2] == 'you'
- echo I am here
- return
- endif
- elseif argv[1] != 'is' && argv[1] != 'was' && argv[1] != 'were'
- goto usage
- endif
- local i w x u v
- set u everywhere elsewhere "in a cavern, deep below the surface of Mars"
- set v "in the "{bedroom,kitchen,garage,bathtub,sink,"living room"} downtown
- set w "out of "{town,sight,"this world"} "on the "{floor,roof,moon}
- set x "in "{orbit,hyperspace,"your dreams"}
- set u $u $v $w $x "at the bottom of the deep blue sea"
- if argv[2]=="there" || argv[2]=="it"
- if argv[1]=="is" || argv[1]=="are" || argv[1]=="was" || argv[1]=="were"
- i=ran(#u)
- echo $argv[2] $argv[1] $argv[3-*] $u[$i]
- return
- endif
- endif
- i=1
- while ++i<#argv
- if argv[i]=='my'
- argv[i]='your'
- elseif argv[i]=='your'
- argv[i]='my'
- endif
- endwhile
- set v nowhere "gone with the wind" "lost in space" "up in smoke"
- set u $u $v "down the "{tubes,drain}
- i=ran(#u)
- echo $argv[2-*] $argv[1] $u[$i]
- return
- # a script to help you locate lost items; just ask where things are:
- #
- # % where are my sox
- # your sox are in the bedroom
- # % where am I
- # you are there
- #
- # Where is provided for entertainment purposes only; no warrantee of
- # its suitability for any purpose whatsoever is either expressed or implied.
-